package com.sright.bcard.cms.tes.util;

import com.sright.bcard.common.service.share.dto.page.BetweenDateParamRequest;
import com.sright.bcard.common.service.share.dto.page.PageParamRequest;
import com.sright.bcard.common.service.share.utils.DateTimeUtils;

import java.util.Date;

/**
 * Author: lumf
 * Date: 2020/8/21 10:41 AM
 */
public  class CmsTestUtil {
    public static BetweenDateParamRequest getBetweenDate() {
        return BetweenDateParamRequest.request(getBetweenDay1(), getBetweenDay2());
    }

    public static Date getBetweenDay1() {
        return DateTimeUtils.formatDate("2018-04-18 10:16:22", DateTimeUtils.DATE_TIME_STYLE);
    }

    public static Date getBetweenDay2() {
        return DateTimeUtils.formatDate("2020-04-18 10:16:22", DateTimeUtils.DATE_TIME_STYLE);
    }

    public static Long getBetweenDay1Stamp() {
        return getBetweenDay1().getTime();
    }

    public static Long getBetweenDay2Stamp() {
        return getBetweenDay2().getTime();
    }


    public static PageParamRequest getPageReuest() {
        Integer pageIndex  = 1;
        Integer pageSize = 20;
        return PageParamRequest.pageRequest(pageIndex, pageSize);
    }
}
